home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / burglr / burglar.frm < prev    next >
Text File  |  1995-05-08  |  2KB  |  64 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00808080&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   645
  7.    ClientLeft      =   5955
  8.    ClientTop       =   1485
  9.    ClientWidth     =   1410
  10.    ControlBox      =   0   'False
  11.    Height          =   1050
  12.    Icon            =   BURGLAR.FRX:0000
  13.    Left            =   5895
  14.    LinkMode        =   1  'Source
  15.    LinkTopic       =   "Form1"
  16.    MaxButton       =   0   'False
  17.    MinButton       =   0   'False
  18.    ScaleHeight     =   645
  19.    ScaleWidth      =   1410
  20.    Top             =   1140
  21.    Width           =   1530
  22.    Begin Timer Timer1 
  23.       Interval        =   2500
  24.       Left            =   600
  25.       Top             =   0
  26.    End
  27.    Begin PictureBox Picture1 
  28.       Height          =   495
  29.       Left            =   0
  30.       ScaleHeight     =   465
  31.       ScaleWidth      =   465
  32.       TabIndex        =   0
  33.       Top             =   0
  34.       Width           =   495
  35.    End
  36. End
  37. Sub form_load ()
  38. Randomize Timer
  39. picture1.picture = LoadPicture("burglar.ico")
  40. form1.width = picture1.width
  41. form1.height = picture1.height
  42. form1.top = (Rnd * screen.height + 1) - form1.height
  43. form1.left = (Rnd * screen.width + 1) - form1.width
  44. End Sub
  45.  
  46. Sub Picture1_Click ()
  47. Unload form1
  48. End
  49. End Sub
  50.  
  51. Sub Timer1_Timer ()
  52. form1.visible = 0
  53. delay = (Rnd * 5000) + 1
  54. For y = 1 To delay
  55.     x = DoEvents()
  56. Next y
  57.     x = DoEvents()
  58. form_load
  59.     x = DoEvents()
  60. form1.visible = -1
  61.     x = DoEvents()
  62. End Sub
  63.  
  64.